#ifndef _FIELDINFOIMPL_H_
#define _FIELDINFOIMPL_H_

#include "stdafx.h"
#include <db/idatabase.h>

class CXFieldInfo : public IFieldInfo, public CUnknownImp
{
public:
    CXFieldInfo(void);
    virtual ~CXFieldInfo(void);

public:
    BEGIN_STDCOM_MAP
    STDCOM_INTERFACE_ENTRY(IFieldInfo)
    END_STDCOM_MAP

public:
    std_method_(LPCSTR, GetName)();
    std_method_(UINT, GetFlag)();
    std_method_(LPCSTR, GetTypeName)();
    std_method_(int, GetType)();
    std_method_(ULONG, GetLength)();
    std_method_(LPCSTR, GetDefault)();
    std_method_(UINT, GetDecimals)();
    std_method(SetName)(LPCSTR lpszName);
    std_method(SetFlag)(UINT nFlag);
    std_method(SetType)(int nType);
    std_method(SetTypeName)(LPCSTR lpszType);
    std_method(SetLength)(unsigned long nLength);
    std_method(SetDefault)(LPCSTR lpszValue);
    std_method(SetDecimals)(unsigned int nDecimals);

public:
    static HRESULT CreateInstance(IFieldInfo** ppFieldInfo);

private:
    std::string m_strName;
    std::string m_strTypeName;
    unsigned int m_nFlag;
    std::string m_strDefault;
    int m_nType;
    unsigned int m_nDecimals;
    unsigned long m_nLength;
};

#endif
